  //实例化
  import {
    YprogressBar
  } from './yprogressbar.js'

  var ypb = new YprogressBar({
    title: "正在扫描证书...",
    des: "剩余时间约 {{y:second}} 秒",
    closeable: true,
    cancelCallback: function (rate, vars) {
      //console.log(rate);
      //console.log(vars);
    }
  });
  //显示
  function start(n, s) {

    ypb.show();
    ypb.update((n * 1).toFixed(2) * 100, {
      second: (s * 1).toFixed(3)
    });
  }

  function end() {
    var box = document.querySelector(".y-progress-bar-box");
    box.style.display = "none"
  }
  export {
    start,
    end,
  }